﻿/**
FlexFlow 工具JS
**/


//根据指定的备注文本构建备注ToolTip
function buildTag(tag) {
    if (tag == null)
        return null;
    var arr = tag.split(':');
    if (arr.length <= 1)
        return tag;
    switch (arr[0]) {
        case "Info":
            return "<span class='label label-info arrowed-in-right arrowed'>" + arr[1] + "</span>";
        case "Default":
            return "<span class='label'>" + arr[1] + "</span>";
        case "Success":
            return "<span class='label label-success arrowed'>" + arr[1] + "</span>";
        case "Danger":
            return "<span class='label label-danger arrowed-in tooltip-error' data-rel='tooltip' data-placement='bottom' data-original-title='" + arr[2] + "' >" + arr[1] + "</span>";
        default:
            return tag;
    }
}